home *** CD-ROM | disk | FTP | other *** search
/ Hackers Handbook - Millenium Edition / Hackers Handbook.iso / library / hack / sendmail-8_9_1.txt < prev    next >
Encoding:
Internet Message Format  |  1998-10-15  |  2.0 KB

  1. Date: Thu, 9 Jul 1998 19:31:52 +0200
  2. From: Michal Zalewski <lcamtuf@IDS.PL>
  3. Subject: Sendmail up to 8.9.1 - mail.local instroduces new class of bugs
  4.  
  5. Local, setuid mail delivery program included in recent packages -
  6. mail.local - introduces new class of local bugs, from DoS attacks to
  7. security compromises.
  8.  
  9. For example, it creates unique temporary file in /tmp at UID 0 (no
  10. comments), opens and unlinks it. Then blindly writes every line read from
  11. fd 0 to this file. So, to eat whole disk space, ignoring sendmail.cf
  12. settings (because mail.local won't parse it at all), attacker should run
  13. mail.local, caught tmp file creation, hard-link it to /tmp/other_file,
  14. then redirect a lot of text junk to it's fd 0.
  15.  
  16. But that's not all. Using 'mail.local -f sender recipient', local users
  17. are able to put **anything** to mailboxes of other users. This cute
  18. program simply allows creating and writing to files /var/mail with
  19. virtually no restrictions. Aliases are not expanded, so attacker can even
  20. *create* and fill with hundred megabytes of junk mailboxes for accounts
  21. like 'nobody'. It won't even put basical auth information, except 'From
  22. xxx' line at the beginning... But it can be altered with '-f' switch :-0
  23.  
  24. Arbitrary headers are allowed, opening potential security compromises with
  25. dumb mail clients. Additionally, by providing specific data as 'sender',
  26. mailbox may be left in unusable state - eg. pine won't open it, saying
  27. it's 'Not in mailbox format'.
  28.  
  29. Fix:
  30.  
  31. It's stupid to make any part of sendmail package setuid. It's really
  32. possible to make sendmail work with no setuid nor setgid, by arranging
  33. proper communication with sendmail daemon, if running. Also, I suggest to
  34. be at least careful with new features of recent Sendmail version :-)
  35.  
  36. _______________________________________________________________________
  37. Michal Zalewski [lcamtuf@boss.staszic.waw.pl] <= finger for pub PGP key
  38. Iterowac jest rzecza ludzka, wykonywac rekursywnie - boska [P. Deutsch]
  39. [echo "\$0&\$0">_;chmod +x _;./_] <=------=> [tel +48 (0) 22 813 25 86]
  40.